#include <iostream>
#include <stdio.h>
#include <math.h>
#include <string.h>

using namespace std;
int shu[3003];
bool flag[3003];
bool yes;
int n;
int main()
{
    int i;
    int diff;
    while ( scanf("%d", &n)!=EOF)
    {
        for (i=1; i<=n; ++i)
        	scanf("%d", shu+i);
       	
       	
       	if (n==1) 
        {
            printf("Jolly\n");
            continue;
        }
        
        memset(flag, 0, sizeof(flag));
        yes = true;

        for (i=1; i<n; ++i)
       	{
       	    diff = abs(shu[i]-shu[i+1]);
       	    if (diff >= n)
       	    {
       	        yes = false;
       	        break;
       	    }    
       	    flag[diff] = true;
       	}    
       	if (yes)
       	      	for (i=1; i<=n-1; ++i)
       	      		if (!flag[i])
       	      		{
       	      		    yes = false;
       	      		    break;
       	      		}    
        if (yes) 	printf("Jolly\n");
        else 	    printf("Not jolly\n");
        
        
        
    }    
        
    
    
    return 0;
}    


